<?
session_start();

require_once('config.php');
require_once('class/cls_product.php');

$product  = new cls_product();


if (isset($_REQUEST['rid']))
        {
			 $product->delete_product_list($_REQUEST['rid']);

        }

			
 	
?>
<html>
<head>
<title>Show User</title>
<link href="../soethida/um_sty.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#F7F9F0">
<table id="Table_01" width="775" height="32" align="center" border="0" cellpadding="0" cellspacing="0">

	<tr>

		<td width="233" height="32"><img src="images/banner.jpg" width="774" height="100" alt=""></td>

		
  </tr>
</table>  
<table id="Table_02" width="775" height="24" align="center" bgcolor="#000000" border="0" cellpadding="0" cellspacing="0">

	<tr>

		<td width="544" align="left" valign="middle">

		&nbsp;&nbsp;&nbsp;<a  href="index.php" class="ummenu" >Home</a>		

		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		
		<a href="customer_service.php" class="ummenu">Customer Services</a>
		
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

		<a href="contact_us.php" class="ummenu">Contact Us</a>
		
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

		<a href="aboutus.php" class="ummenu">About Us</a>


		

		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

		<td width="231" height="24" align="right" valign="middle"><a href="http://66.94.233.46/babelfish/trurl_pagecontent?lp=en_ja&trurl=http%3a%2f%2fwww.umgroups.com">

		</a>&nbsp;&nbsp;

		<a href="http://66.94.233.46/babelfish/trurl_pagecontent?lp=en_zt&trurl=http%3a%2f%2fwww.umgroups.com">		</a>&nbsp;&nbsp;

		<a href="http://66.94.233.46/babelfish/trurl_pagecontent?lp=en_ko&trurl=http%3a%2f%2fwww.umgroups.com">		</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>

	</tr>

</table>
<table id="Table_01" width="775" border="0" cellpadding="0" cellspacing="0" align="center" bgcolor="#FFFFFF" style="border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC" >
<tr>
          <td>
   		<table width="775" border="0" cellspacing="0" cellpadding="0" align="center">
		  <tr>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
	      </tr>
		  <tr>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
	      </tr>
		  <tr>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
		    <td align="center">&nbsp;</td>
	      </tr>
		  <tr>
		  <td width="30" align="center">No</td>
				<td align="center">Coordinator Name</td>
				<td align="center">Image</td>
				<td width="200" align="center">Brand</td>
				
		        <td width="200" align="center">Type</td>
		        <td align="center">Price</td>
		        <td width="50" align="center">&nbsp;</td>
		</tr>
		<tr><td colspan="7"><hr width="100%"></td></tr>
<?
		$pageno	 	= isset($_REQUEST['page']) 	? $_REQUEST['page'] : 1;	

		$object		= $product->get_product_list($pageno);
		
		//print_r ($object); 
		$pagecount	= $object['pagecount'];
		//echo $pagecount;
		$numrows	= $object['numrows'];		
		//echo $numrows;
		unset($object['numrows'],$object['pagecount']);
		
		if (count($object) > 0)
		{
	
				
			foreach ($object as $row) {
?>
		
		  <tr>
		    <td align="center"><?= $row['product_id'] ?></td>
			<td align="center"><?= $row['coordinator_name'] ?></td>
			<td width="80" height="59" align="center"><img src="um-img/<?= $row['product_id'].".jpg" ?>" align="right" width="100" height="75"></td>
			<td width="200" align="center"><?= $row['brand'] ?></td>
		    <td width="200" align="center"><?= $row['type'] ?></td>
		    <td align="center">$<?= $row['price'] ?></td>
		    <td align="center"><a href="<? $_SERVER['PHP_SELF'] ?>?rid=<?= $row['product_id'] ?>" onClick="return confirm('Are you sure you want to delete?')">Delete</a></td>
		  </tr>
		  
		  <tr><td colspan="7"><hr width="100%"></td></tr>
   		

		
<?										}//for
		}//if		

?>
		<tr>
			<td  colspan="7" align="left">			</td>
		</tr>
		
		<tr>
		  <td align="right" >&nbsp;</td>
		  <td colspan="6">&nbsp;</td>
		  </tr>
		<tr><td  colspan="3" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<? 
				require_once("class/cls_utility.php");
				$utility	= new utility();
				//$utility->paging("",$pagecount,$numrows,$qrystr,$pageno); 
				$utility->paging("",$pagecount,$numrows,"",$pageno);
			?></td>
		<td colspan="4"><div align="right"><a href="admin.php">Back to Admin Page.</a>&nbsp;&nbsp;&nbsp;</div></td></tr>
		<tr>
		  <td height="2" colspan="7" bgcolor="#CCCCCC"></td>
		  </tr>
		</table>
   		<table align="center" border="0" cellpadding="0" cellspacing="0" width="775" id="table6" bgcolor="#FFFFFF" style="border-bottom: 3px solid #DF8A0B;">

			<tr>

				<td width="100%" height="30" class="foot">&nbsp;</td>
		  </tr>
	</table></td></tr>
</table>		
</body>
</html>
